package demo02finalmethod;

public class Test {
    public static void main(String[] args) {
        Animal an = new Cat();
        an.eat();
        //an.catchMouse();//错误
        Cat c = (Cat) an;
        Dog d = (Dog)an;
        d.watchHouse();//异常
        //java.lang.ClassCastException
    }
}
